package com.sigmatrix.h5.service.inspect;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.sigmatrix.h5.entity.v2.PackStandard;
import com.sigmatrix.h5.entity.v2.Product;

/**
 * 
 * 当前稽查的码的相关信息
 * 
 * @author wei.wang
 *
 */
public class CurrentQrCode {

	/**
	 * 当前查询的码。
	 */
	private String qrCode;

	/**
	 * 标识qrCode的类型： com.sigmatrix.h5.enums.CodeType
	 */
	private Integer codeType;

	private Product product;

	private List<PackStandard> packStandards;

	/**
	 * 产品生产时间
	 */
	private Date productTime;

	/**
	 * 产品批次
	 */
	private String productBatchCode;

	/**
	 * 当前的码
	 */
	private Code CurrentCode;

	/**
	 * 当前的码 序号
	 */
	private String currentSeqNum;

	/**
	 * 父级别码
	 */
	private List<Code> parentCode = new ArrayList<>();

	/**
	 * 子级别码
	 */
	private List<Code> ChildCode = new ArrayList<>();

	public String getQrCode() {
		return qrCode;
	}

	public void setQrCode(String qrCode) {
		this.qrCode = qrCode;
	}

	public Integer getCodeType() {
		return codeType;
	}

	public void setCodeType(Integer codeType) {
		this.codeType = codeType;
	}

	public String getProductBatchCode() {
		return productBatchCode;
	}

	public void setProductBatchCode(String productBatchCode) {
		this.productBatchCode = productBatchCode;
	}

	public String getCurrentSeqNum() {
		return currentSeqNum;
	}

	public void setCurrentSeqNum(String currentSeqNum) {
		this.currentSeqNum = currentSeqNum;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public List<Code> getParentCode() {
		return parentCode;
	}

	public void setParentCode(List<Code> parentCode) {
		this.parentCode = parentCode;
	}

	public List<Code> getChildCode() {
		return ChildCode;
	}

	public void setChildCode(List<Code> childCode) {
		ChildCode = childCode;
	}

	public Code getCurrentCode() {
		return CurrentCode;
	}

	public void setCurrentCode(Code currentCode) {
		CurrentCode = currentCode;
	}

	public Code buildCode(String qrcode, Short level) {
		return new Code(qrcode, level);
	}

	public Date getProductTime() {
		return productTime;
	}

	public void setProductTime(Date productTime) {
		this.productTime = productTime;
	}

	public List<PackStandard> getPackStandards() {
		return packStandards;
	}

	public void setPackStandards(List<PackStandard> packStandards) {
		this.packStandards = packStandards;
	}

	/**
	 * 码简单封装。
	 * 
	 * @author wei.wang
	 *
	 */
	public class Code {
		/**
		 * qrcode
		 */
		private String qrcode;
		/**
		 * 码级别
		 */
		private Short level;
		/**
		 * 父码
		 */
		private String parentQrcode;
		/**
		 * 其中一个子码
		 */
		private String childQrcode;

		public Code() {
		}

		public Code(String qrcode, Short level) {
			super();
			this.qrcode = qrcode;
			this.level = level;
		}

		public String getQrcode() {
			return qrcode;
		}

		public void setQrcode(String qrcode) {
			this.qrcode = qrcode;
		}

		public Short getLevel() {
			return level;
		}

		public void setLevel(Short level) {
			this.level = level;
		}

		public String getParentQrcode() {
			return parentQrcode;
		}

		public void setParentQrcode(String parentQrcode) {
			this.parentQrcode = parentQrcode;
		}

		public String getChildQrcode() {
			return childQrcode;
		}

		public void setChildQrcode(String childQrcode) {
			this.childQrcode = childQrcode;
		}

	}
}
